{% extends "../../bocore/admin/master.html" %}
{% block title %}{% end %}
{% block header%}{% end %}
{% block sidebar_header %}{% end %}
{% block content_header_title%}ORM 例子{% end %}
{% block content_header_breadcrumb%}{% end %}
{% block content_body%}
<div>以学校老师学生三者映射关系为例子来测试many_to_one、many_to_many、one_to_one的正确性</div>
<div>可以在meta.py中设置断点查看</div>
<div>虽然这是ORM示例插件，同时也展示了怎么使用AJAX</div>
<div>
    <button type="button" id="run-demo">执行</button>
</div>
{% end %}
{% block footer%}
<script type="text/javascript">
    $(function(){
        $('#run-demo').click(function(){
            $.post("{{api('orm_test')}}", {}, function(rsp){
                        console.log(rsp);
                    }, "json");
        });

    });

</script>
{% end %}